In recent years, cryptographic techniques have been used for data of contents to be stored in a storage medium, data transmitted and received via a network, and so on.
Apparatuses that handle data to which such cryptographic techniques have been applied include a data transfer device that reads data from a memory, performs cryptographic processing on the data, and writes the processed data into the memory. Here, the term “data transfer” means that the series of operations, namely the reading of the data, the encryption of the data, and the writing of the encrypted data. The term “cryptographic processing” means encryption of data and decryption of encrypted data.
For example, in the case of a communication apparatus such as a mobile phone, copyrighted data such as movie data and music data stored in the storage of the apparatus has been encrypted in advance. Accordingly, to playback the data, it is necessary for the apparatus to once decrypt the data. For this purpose, a data transfer device included in the apparatus performs cryptographic processing (i.e. decryption) on the encrypted data read from the storage, and writes the resultant data into the memory.
Also, if audio data relating voice communications has been encrypted as well, the data transfer device once reads the audio data, performs the cryptographic processing on the data, and writes the resultant data into the memory.
Meanwhile, some of such communication apparatuses have a multitask function, that is, a function to execute a plurality of processes in parallel.
With use of the multitask function, the apparatus can perform, for example, voice communications and playback of image data stored in the storage in parallel.
In this case, if the data transfer device can not perform cryptographic processing on different pieces of data at the same time, it is necessary to switch between the transfer of the image data and transfer of the audio data. Here, the voice communications should be realized with strict immediacy. Therefore, it is sometimes necessary to perform the transfer of the audio data by interrupting the transfer of the image data, in order to realize QOS (Quality of Service) by ensuring a certain communication speed.
For transferring different types of data in the above-described manner, there has been a suggestion of a certain cryptographic processing device. According to this suggestion, the cryptographic processing device is capable of interrupting transfer of low-priority data in order to transfer high-priority data, depending on the type of the cryptographic algorithm and cryptographic processing mode applied (see Patent Document 1).
FIG. 9 is a functional block diagram of the cryptographic processing device disclosed in the Patent Document 1.
A cryptographic processing device 1000 illustrated in FIG. 1 has a structure in which a DMAC 1004 performs the following operations according to instructions from a CPU 1001: The DMAC 1004 reads data stored in a data storage memory 1002 and inputs the read data into a common key cryptosystem block 1007 or a hash block 1008 via a selector 1005, and writes the result of the processing by the common key cryptosystem block 1007 or the hash block 1008 into the data storage memory 1002 via a selector 1010. In the middle of the processing of low priority data performed by the common key cryptosystem block 1007 or the hash block 1008, the cryptographic processing device 1000 interrupts the processing and stores intermediate results of the processing in an IV register 1006 or an IV register 1009 so that the cryptographic processing device 1000 first completes the processing of high-priority data, and then resumes the processing of the low-priority data.    Patent Document 1: Japanese Laid-open Patent Application Publication No. 2006-39000